package cineplanet.modelo;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the tab_cartelera database table.
 * 
 */
@Embeddable
public class TabCarteleraPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

    @Temporal( TemporalType.TIMESTAMP)
    @Column(name = "CAR_FechaHoraFin")
	private java.util.Date CAR_FechaHoraFin;

    @Column(name = "SAL_IdSala")
	private int SAL_IdSala;

    @Temporal( TemporalType.TIMESTAMP)
    @Column(name = "CAR_FechaHoraInicio")
	private java.util.Date CAR_FechaHoraInicio;

    @Column(name = "PEL_IdPelicula")
	private int PEL_IdPelicula;

    @Column(name = "LOC_IdLocal")
	private int LOC_IdLocal;

    public TabCarteleraPK() {
    }
	public java.util.Date getCAR_FechaHoraFin() {
		return this.CAR_FechaHoraFin;
	}
	public void setCAR_FechaHoraFin(java.util.Date CAR_FechaHoraFin) {
		this.CAR_FechaHoraFin = CAR_FechaHoraFin;
	}
	public int getSAL_IdSala() {
		return this.SAL_IdSala;
	}
	public void setSAL_IdSala(int SAL_IdSala) {
		this.SAL_IdSala = SAL_IdSala;
	}
	public java.util.Date getCAR_FechaHoraInicio() {
		return this.CAR_FechaHoraInicio;
	}
	public void setCAR_FechaHoraInicio(java.util.Date CAR_FechaHoraInicio) {
		this.CAR_FechaHoraInicio = CAR_FechaHoraInicio;
	}
	public int getPEL_IdPelicula() {
		return this.PEL_IdPelicula;
	}
	public void setPEL_IdPelicula(int PEL_IdPelicula) {
		this.PEL_IdPelicula = PEL_IdPelicula;
	}
	public int getLOC_IdLocal() {
		return this.LOC_IdLocal;
	}
	public void setLOC_IdLocal(int LOC_IdLocal) {
		this.LOC_IdLocal = LOC_IdLocal;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TabCarteleraPK)) {
			return false;
		}
		TabCarteleraPK castOther = (TabCarteleraPK)other;
		return 
			this.CAR_FechaHoraFin.equals(castOther.CAR_FechaHoraFin)
			&& (this.SAL_IdSala == castOther.SAL_IdSala)
			&& this.CAR_FechaHoraInicio.equals(castOther.CAR_FechaHoraInicio)
			&& (this.PEL_IdPelicula == castOther.PEL_IdPelicula)
			&& (this.LOC_IdLocal == castOther.LOC_IdLocal);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.CAR_FechaHoraFin.hashCode();
		hash = hash * prime + this.SAL_IdSala;
		hash = hash * prime + this.CAR_FechaHoraInicio.hashCode();
		hash = hash * prime + this.PEL_IdPelicula;
		hash = hash * prime + this.LOC_IdLocal;
		
		return hash;
    }
}